package org.proddevplm.dao.data.blocks;

import com.thoughtworks.xstream.annotations.XStreamAlias;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * Block element representation
 */
@XStreamAlias("block")
public class BlockElement extends Identifier {

    //TODO: GUI publishable fields. It's a must

    /**
     * Currently defined private fields. used for evaluation
     */
    @XStreamAlias("fields")
    private Map<String, FlowField> privateFields = new HashMap<String, FlowField>();

    @XStreamAlias("enterStatements")
    private List<String> enterStatements = new ArrayList<String>();

    @XStreamAlias("exitStatements")
    private List<String> exitStatements = new ArrayList<String>();

    /**
     * Field type
     */
    @XStreamAlias("type")
    private int type;

    /**
     * Default field value
     */
    @XStreamAlias("defaultValue")
    private String defaultValue;

    public Map<String, FlowField> getPrivateFields() {
        return privateFields;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public Object getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    public List<String> getEnterStatements() {
        return enterStatements;
    }

    public List<String> getExitStatements() {
        return exitStatements;
    }
}
